package com.gxa.weixing.core.pojo;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.persistence.*;
import java.util.Date;

/**
 * @author lijianmin
 * @date 2022/01/06  00:05:06
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
@Table(name = "tb_shop_goods_consume")
@ApiModel(value = "商品自耗对象")
public class ShopGoodsConsume {

    /**
     * 商品自耗编号
     */
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Column(name = "goods_consume_id")
    @ApiModelProperty(name = "id", value = "商品自耗编号", dataType = "Long", example = "1")
    private Long id;

    /**
     * 商品编号
     */
    @Column(name = "goods_id")
    @ApiModelProperty(name = "goodsId", value = "商品编号", dataType = "Long", example = "1")
    private Long goodsId;

    /**
     * 商品消耗申请数量
     */
    @Column(name = "goods_consume_number")
    @ApiModelProperty(name = "consumeNumber", value = "商品消耗申请数量", dataType = "Integer", example = "1")
    private Integer consumeNumber;

    /**
     * 申请人编号 管理员编号(管理店的人员)
     */
    @Column(name = "user_id")
    @ApiModelProperty(name = "userId", value = "申请人编号", dataType = "Long", example = "2")
    private Long userId;

    /**
     * 申请时间
     */
    @Column(name = "goods_consume_apply_time")
    @ApiModelProperty(name = "applyTime", value = "申请时间", dataType = "Date", example = "申请时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GTM+8")
    private Date applyTime;

    /**
     * 申请备注
     */
    @Column(name = "goods_consume_remarks")
    @ApiModelProperty(name = "remarks", value = "申请备注", dataType = "String", example = "申请备注")
    private String remarks;

    /**
     * 审核时间
     */
    @Column(name = "goods_consume_audit_time")
    @ApiModelProperty(name = "auditTime", value = "审核时间", dataType = "Date", example = "审核时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GTM+8")
    private Date auditTime;

    /**
     * 审核状态 (0 审核中/1 审核通过/ 2审核失败)
     */
    @Column(name = "goods_consume_state")
    @ApiModelProperty(name = "state", value = "审核状态(0 审核中/1 审核通过/ 2审核失败)", dataType = "Integer", example = "审核中")
    private Integer state;

    /**
     * 审核人编号
     */
    @Column(name = "goods_consume_auditor_id")
    @ApiModelProperty(name = "auditorId", value = "审核人", dataType = "Long", example = "1")
    private Long auditorId;

    /**
     * 审核备注
     */
    @Column(name = "goods_consume_audit_remarks")
    @ApiModelProperty(name = "auditRemarks", value = "审核备注", dataType = "String", example = "审核备注")
    private String auditRemarks;
}
